Click Run -> Edit Environment Variables, then click Parameters to open the Script Parameters Editor. Then enter name=value pairs separated by = (values will be urlencoded automatically). Here's the example:
name=DzSoft Perl Editor email=support@dzsoft.com
The following example demonstrates now to use the parameters in your script:
#!/usr/bin/perl use CGI qw(param); my $name = param('name'); print "Content-type: text/html\n\n"; print "<html>Hello, $name!</html>\n";
To send the parameters to script when running on the server, use standard HTML forms.
If your script processes from input using some code like this:
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; }
And you need to test it in DzSoft Perl Editor, please do the following: